﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>微街秀 > 忘记密码</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link type="text/css" rel="stylesheet" href="css/base.css" />
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    <link href="css/Forgot.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script src="js/ajax-data.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#submits').click(function () { submits(); });

        });

        function submits() {         
            if (!ischeck()) return false;
            ajax.ForgetPwd("name=" + Trim($("#username").val()) + "&email=" + Trim($("#email").val()), function (data) {
                if (data.code == "1009") {
                    Alert(data.msg.toString());
                    window.location.href = "login.html";
                }
                else {
                    Alert(data.msg.toString());
                }
            });
        }
        function ischeck() {
            if (Trim($("#username").val()) == "") {
                Alert("请输入用户");
                return false;
            }
            if (Trim($("#email").val()) == "") {
                Alert("请输入邮箱");
                return false;
            }
            return true;
        }
        function Trim(str) {
            return str.replace(/(^\s*)|(\s*$)/g, "");
        }
    </script>
</head>
<body>
    <div class="wamtop">
        <div class="topleft" onclick="window.location.href='login.html'">
           
                <img src="img/5.jpg">
          
        </div>
        <div class="topcententxt">
            忘记密码
        </div>
    </div>
    <div style="margin-top: 50px;" class="box">
        <input type="text" id="username" class="input" placeholder="请输入注册时的用户名">
    </div>
    <div class="box">
        <input type="text" id="email" class="input" placeholder="请输入注册时的邮箱">
    </div>
    <div class="book">
        新密码将发送到注册邮箱！
    </div>
    <div class="box1">
        <div class="input1" id="submits">
            确定</div>
    </div>
</body>
</html>
